package com.ruiyi.adrobot.mongo.fun;/**
 * Created by tao.zeng on 2017/6/8.
 */

import com.mongodb.DBObject;
import com.ruiyi.adrobot.beans.Fun;
import com.ruiyi.adrobot.beans.common.MongoPageRequest;
import org.springframework.data.domain.Page;

import java.util.Map;

/**
 * @author
 * @create 2017-06-08 9:46
 **/
public interface FunOperations {
    Page<Fun> getListByPage(MongoPageRequest<Fun> mongoPageRequest);

    void appendFlow(Integer fun, Fun.Flow flow);

    void updateAction(Integer fun, String flowId, Fun.Flow.Action action);

    Fun.Flow.Action findActionByFunAndFlowsId(Integer fun, String flowId);

    void removeUsedFunsByFun(Integer fun);

    void removeFlowByIdAndFun(String id, Integer fun);

    Map<String, String> findFlowMap();

    Map<Integer, String> findFunMap();

    DBObject findFlowByFunAndFlowId(Integer fun, String flowId);
}
